package com.nuoniu.sibanyun.mapper.project;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.project.SysRdtForm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 表单明细 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2021-06-05
 */
@Mapper
@Component
public interface SysRdtFormMapper extends BaseMapper<SysRdtForm> {

    @Select("SELECT TABLE_NAME AS 'form_name_en',TABLE_COMMENT AS 'description',TABLE_COMMENT AS 'form_name_cn',CREATE_TIME AS 'created_date' FROM information_schema.TABLES WHERE table_schema = 'sibanyun_new'")
    List<SysRdtForm> getFromList();

    @Select("SELECT * FROM sys_rdt_form WHERE FIND_IN_SET( #{menuId},menu_ids) AND project_id = #{projectId}")
    List<SysRdtForm> getList(Integer menuId,Integer projectId);


}
